package com.kma.ncpractice2013.model;

import java.sql.Date;

/**
 *
 * @author Illya
 */
public class User
{
    // are all these field necessary in this POJO class?
    private int id;
    private String login;
    private String password;
    private String salt;
    private String registrationToken;
    private String name;
    private String surname;
    private String phone;
    private int blocked;
    private Date birthdate; // what if forbid users to modify it?
    private Date registrationDate;
    private int groupId;
    private int accessLevelId;
    // related Orders?

    public void setRegistrationToken(String registrationToken) {
        this.registrationToken = registrationToken;
    }

    public void setBlocked(int blocked) {
        this.blocked = blocked;
    }

    public void setAccessLevelId(int accessLevelId) {
        this.accessLevelId = accessLevelId;
    }

    public int getAccessLevelId() {
        return accessLevelId;
    }
    public User()
    {

    }

    public User(int id, String login, String password, String salt, String registrationToken, String name, String surname, String phone, int blocked, Date birthdate, Date registrationDate, int groupId, int accessLevelId) {
        this.id = id;
        this.login = login;
        this.password = password;
        this.salt = salt;
        this.registrationToken = registrationToken;
        this.name = name;
        this.surname = surname;
        this.phone = phone;
        this.blocked = blocked;
        this.birthdate = birthdate;
        this.registrationDate = registrationDate;
        this.groupId = groupId;
        this.accessLevelId = accessLevelId;
    }

    public String getLogin() {
        return login;
    }

    public String getName() {
        return name;
    }

    public String getSurname() {
        return surname;
    }

    public String getPassword() {
        return password;
    }

    public String getSalt() {
        return salt;
    }

    public String getPhone() {
        return phone;
    }

    public int getId() {
        return id;
    }

    public int isBlocked() {
        return blocked;
    }

    public Date getBirthdate() {
        return birthdate;
    }

    public Date getRegistrationDate() {
        return registrationDate;
    }

    public int getGroupId() {
        return groupId;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setIsBlocked(int blocked) {
        this.blocked = blocked;
    }

    public void setBirthdate(Date birthdate) {
        this.birthdate = birthdate;
    }

    public void setRegistrationDate(Date registrationDate) {
        this.registrationDate = registrationDate;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    public String getRegistrationToken() {
        return registrationToken;
    }
    
}
